/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */
#pragma once

#include <NoCopy.h>

namespace liba
{

/* This template automatically deletes all pointers stored in the container class. */
template<class Con>
class AutoContainer : public Con
{
public:
	~AutoContainer()
	{
		typename Con::iterator cit = Con::begin();
		for( ;cit != Con::end(); ++cit )
		{
			delete *cit; *cit = 0;
		}
	}
};

// Use boost pointer container lib instead of this
#pragma deprecated(AutoContainer)

} // namespace liba

using namespace liba;

